DROP TABLE IF EXISTS jms_dws.dws_actual_aging_sign_dt;
CREATE EXTERNAL TABLE jms_dws.dws_actual_aging_sign_dt (
     billcode                  string           comment               '运单号'
    ,scansitecode              string           comment               '操作网点编码'
    ,scantime                  timestamp        comment               '扫描时间,sign表为delivertime'
    ,inputtime                 timestamp        comment               '录入时间'
    ,weight                    decimal(10,2)    comment               '重量'
    ,send_deliver_user         string           comment               '派件或收件员，sign表中为deliveruser'
    ,send_deliver_usercode     string           comment               '派件或收件员'
    ,scantype                  string           comment               '扫码类型'
  )
    comment '时效实际签收表'
        PARTITIONED by (
   tabletype    string comment '表类型；actual_sign-实际签收，aging_sign-时效签收，prior_actual_sign-带优先级需求的实际签收，prior_aging_sign-带优先级需求的时效签收',
   dt           string comment '时间分区(yyyy-MM-dd)')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dws.db/external/dws_actual_aging_sign_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );

MSCK REPAIR TABLE jms_dws.dws_actual_aging_sign_dt ;